package likou;

/**
 * @author: Tangxz
 * @email: 1171702529@qq.com
 * @cate: 2021/10/02 21:28
 */
public class _405 {
    public String toHex(int num) {
        if (num < 0) {
            num = Math.abs((Integer.MAX_VALUE ^ num)+1);
        }
        String res = "";
        while (num != 0) {
            int now = num % 16;
            num /= 16;
            res = (now >= 10 ?  (char)(now - 10)+'a' : now) + res;
        }
        return res;
    }

    public static void main(String[] args) {
        _405 o = new _405();
        System.out.println(o.toHex(26));
    }
}
